import ReactDOM from 'react-dom/client'
import AuthPage from './AuthPage'
import ContextWrapper from './contexts'
import './i18n'
import './preloadError'
import reportWebVitals from './reportWebVitals'
import './style/applies.css'
import './style/classes.css'
import './style/common.less'
import './style/index.css'
import './style/markdown.css'

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
root.render(
  <ContextWrapper>
    <AuthPage />
  </ContextWrapper>
)
reportWebVitals()

// 预加载 会话页面使用的资源
setTimeout(() => {
  import('./pages/ChatAppPage').then(module => {
    console.log('SkillChatPage preloaded')
  })
}, 3000)
